package com.share.example.selenium.web;

import com.share.common.common.Result;
import com.share.example.selenium.service.hzhc.task_v2.HcxxTask_v2LoginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/hzhc/task_v2")
public class HzhcTask_v2Controller {

    @Autowired
    private HcxxTask_v2LoginService hcxxTask_v2LoginService;

    @RequestMapping("/to/task/home/page")
    public Result toTask() {
        return Result.success(hcxxTask_v2LoginService.toTaskHomePage());
    }

    @RequestMapping("/listAllTask")
    public Result listAllTask(String token) {
        return Result.success(hcxxTask_v2LoginService.listAllTask(token));
    }

    @RequestMapping("/addTaskLog")
    public Result addTaskLog(String token, String taskId, String workhour, String content) {
        return Result.success(hcxxTask_v2LoginService.addTaskLog(token, taskId, workhour, content));
    }
}


